package cn.hr.service;

import cn.hr.base.BaseService;
import cn.hr.pojo.Dictionary;
import org.springframework.cache.annotation.Cacheable;

import java.sql.SQLException;
import java.util.List;

/**
 * 数据字典服务接口
 *
 * @author MO
 */
public interface DictionaryService extends BaseService<Dictionary> {

    /**
     * 根据类型查询所有
     *
     * @return
     */
    List<Dictionary> selectAllByTypeName(String typeName)throws SQLException;

    /**
     * 根据类型和value 获取
     */
    @Cacheable(keyGenerator = "keyGenerator")
    Dictionary get(String type, Integer val) throws SQLException;
}
